package com.xf.demo;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDateTime;

/**
 * @author 谢飞
 */
@Slf4j
@RestController
@SpringBootApplication
public class HelloApplication {

    public static void main(String[] args) {
        SpringApplication.run(HelloApplication.class, args);
        System.out.println("=========启动成功=============");
    }

    // curl http://127.0.0.1:8080/hello
    @GetMapping("/hello")
    public String hello() {
        log.info("当前时间：{}", LocalDateTime.now());
        return "hello";
    }
}
